import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    { // default
      path: '/',
      redirect: '/main/home'
    },
    {
      path: '/main',
      name: 'Main',
      component: resolve => require(['@/layout/Main'], resolve),
      children: [
        { // 首页
          path: 'home',
          name: 'Home',
          component: resolve => require(['@/home/Home.vue'], resolve)
        },
        { // 日志
          path: 'log',
          name: 'Log',
          component: resolve => require(['@/log/Log.vue'], resolve)
        }
      ]
    }
  ]
})
